package com.example.flower_shop.enums;

import lombok.Getter;

@Getter
public enum RoleEnum {
    ADMIN("admin", "管理员"),
    BUS("bus", "商家"),
    USER("user", "用户");
    private final String role;
    private final String label;

    RoleEnum(String role, String label) {
        this.role = role;
        this.label = label;
    }

    public static boolean buildInRole(String roleName) {
        return ADMIN.getRole().equals(roleName) || BUS.getRole().equals(roleName) || USER.getRole().equals(roleName);
    }
}
